% Get date from an index of a date
% Input: date_index
% Output: date
function dates = getDate(dates_index)
    
    % get year, month, day from dates_index
    y = year (dates_index);
    m = month(dates_index);
    d = day  (dates_index);
    
    % create a character '-' to add to the results
    bar = zeros(length(y), 1);
    bar(:) = '-';
    
    % combine year, month, day => date
    dates = [int2str(y(:)) bar int2str(m(:)) bar int2str(d(:))];
end